package com.tencent.stat.common;

public class h
{
  static
  {
    if (!(h.class.desiredAssertionStatus()));
    for (int i = 1; ; i = 0)
    {
      a = i;
      return;
    }
  }

  public static byte[] a(byte[] paramArrayOfByte, int paramInt)
  {
    return a(paramArrayOfByte, 0, paramArrayOfByte.length, paramInt);
  }

  public static byte[] a(byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3)
  {
    j localj = new j(paramInt3, new byte[paramInt2 * 3 / 4]);
    if (!(localj.a(paramArrayOfByte, paramInt1, paramInt2, true)))
      throw new IllegalArgumentException("bad base-64");
    if (localj.b == localj.a.length)
      return localj.a;
    paramArrayOfByte = new byte[localj.b];
    System.arraycopy(localj.a, 0, paramArrayOfByte, 0, localj.b);
    return paramArrayOfByte;
  }

  public static byte[] b(byte[] paramArrayOfByte, int paramInt)
  {
    return b(paramArrayOfByte, 0, paramArrayOfByte.length, paramInt);
  }

  public static byte[] b(byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3)
  {
    int j;
    k localk = new k(paramInt3, null);
    int i = paramInt2 / 3 * 4;
    if (localk.d)
    {
      paramInt3 = i;
      if (paramInt2 % 3 > 0)
        paramInt3 = i + 4;
      i = paramInt3;
      if (localk.e)
      {
        i = paramInt3;
        if (paramInt2 > 0)
        {
          j = (paramInt2 - 1) / 57;
          if (!(localk.f))
            break label186;
        }
      }
    }
    label186: for (i = 2; ; i = 1)
      while (true)
      {
        while (true)
        {
          while (true)
          {
            i = paramInt3 + i * (j + 1);
            localk.a = new byte[i];
            localk.a(paramArrayOfByte, paramInt1, paramInt2, true);
            if ((a) || (localk.b == i))
              break label192;
            throw new AssertionError();
            paramInt3 = i;
            switch (paramInt2 % 3)
            {
            case 0:
            default:
              paramInt3 = i;
            case 1:
            case 2:
            }
          }
          paramInt3 = i + 2;
        }
        paramInt3 = i + 3;
      }
    label192: return localk.a;
  }
}